package me.chan.netty.util;

import java.io.UnsupportedEncodingException;
import java.nio.ByteBuffer;
import java.util.UUID;

import static me.chan.netty.util.ByteBufferUtils.display;

public class UUIDUtils {

    public static String genUUID() {
        return UUID.randomUUID().toString().replace("-", "");
    }


    public static void main(String[] args) throws UnsupportedEncodingException {
        String uuid = genUUID();
        System.out.println(uuid);
        ByteBuffer buffer = ByteBuffer.wrap(uuid.getBytes());
        display(buffer);
    }
}
